import { ConfigManager } from "./manager/ConfigManager";
import { DataManager } from "./manager/DataManager";
import { GameManager } from "./manager/GameManager";
import { LangManager } from "./manager/LangManager";
import { NetworkManager } from "./manager/NetworkManager";
import { ResourceManager } from "./manager/ResourceManager";
import { SoundManager } from "./manager/SoundManager";
import { UIManager } from "./manager/UIManager";
import { _decorator, Component, Node } from 'cc';
import { LogManager } from "./manager/LogManager";
import { EventManager } from "./manager/EventManager";
const { ccclass, property } = _decorator;

export class Jees {

    static C: ConfigManager;
    static D: DataManager;
    static E: EventManager;
    static G: GameManager;
    static L: LangManager;
    static N: NetworkManager;
    static R: ResourceManager;
    static S: SoundManager;
    static UI: UIManager;
    static LOG: LogManager;

    static init(_node?: Node) {

        // 数据中心
        DataManager.init(this)
        // 日志中心
        LogManager.init(this)
        // 事件注册
        EventManager.init(this)

        if (_node) {
            // UI管理
            UIManager.init(this, _node);
            // 网络管理
            NetworkManager.init(this, _node);
        }

        this.LOG.info('[Jees]', 'Init', 'End');
    }

}